<?php
	if (is_admin())
		add_action("admin_menu", "setup_theme_admin_menus");
	function setup_theme_admin_menus()
	{
        // Parent menu
	add_menu_page('General Settings', 'CouponX settings', 'manage_options', 'cpx_theme_setting',
			'theme_settings_page');
        // Childs menu
	add_submenu_page('cpx_theme_setting', 'Social settings', 'Social settings', 'manage_options',
					'front-page-elements', 'social_settings');
        add_submenu_page('cpx_theme_setting', 'Pagination post', 'Pagination setting', 'manage_options',
					'pagination-setting', 'pagination_settings');
        add_submenu_page('cpx_theme_setting', 'Following Emails', 'Following Emails', 'manage_options',
					'following-emails', 'following_emails');
	}
    function social_settings()
    {
        include('setting-page/social_settings.php');
    }
    function theme_settings_page()
    {
		include('setting-page/theme_setting.php');
    }
    function pagination_settings()
    {
        include('setting-page/pagination_settings.php');
    }
    function following_emails()
    {
        include('setting-page/following_emails.php');
    }
?>